(function() {
  var supportsOrientationChange = 'onorientationchange' in window ? 'orientationchange' : 'resize';
	var timeoutId;

	function setRem() {
		var clientWidth = document.documentElement.clientWidth;
		var nowPX = clientWidth / 375 * 16;
		document.documentElement.style.fontSize = nowPX + 'px';
	}
	setRem();
  //监听 屏幕旋转事件
	window.addEventListener(supportsOrientationChange, function() {
		clearTimeout(timeoutId);
		timeoutId = setTimeout(function() {
			setRem();
		}, 300);
	}, false);
})();
